﻿@{
    Layout = null;
}
@using EmoneyWeiXinEntity;
@using EmoneyWeiXinCommon;
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>我的成绩</title>
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
    <meta name="format-detection" content="telephone=no" />
    <meta name="format-detection" content="email=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <link type="text/css" href="@Url.Content("~/css/basic.css")?@(new Random().Next(1, 1000))" rel="stylesheet"/>
    <script type="text/javascript" src="@Url.Content("~/js/jquery.js")"></script>
    <script type="text/javascript" src="@Url.Content("~/js/jweixin-1.0.0.js")"></script>
    <script type="text/javascript" src="@Url.Content("~/js/WeiXinCommon.js")?@(new Random().Next(1, 1000))"></script>
</head>
<body onresize="rize()" onload="rize()" class="account_bg">
    @{
        ActivityDataEntity currData = ViewBag.currData as ActivityDataEntity;
        List<ActivityDataEntity> topList = ViewBag.topList;
    }
    <div class="account">
        <div class="account_title">
            <span>@{
                int dj = currData.Jifen >= 1500 ? 1 : currData.Jifen >= 1000 ? 2 : currData.Jifen >= 100 ? 3 : 4;
            }
                <img src="@(currData.headimgUrl)"></span><b><img src="@Url.Content("~/images/account_h3_img0" + dj + ".png")"></b>
        </div>
        <h3><span>@currData.nickName</span></h3>
        <p class="account_font">30秒内抓取@(currData.Jifen / 10)个涨停股获取@(currData.Jifen)积分</p>
        <div class="hongbao">
            <div class="hb_top">
                <h4 id="hb_currentMoney">@(currData.canGetMoney)元</h4>
                <p>现金红包</p>
            </div>
            <p class="account_font02"><a href="#" id="btnLjTx">立即提现</a><a class="txwtlk" href="http://mp.weixin.qq.com/s?__biz=MzAxMTA0ODM3Mw==&mid=214512529&idx=2&sn=32c186e457b144f04ecfbc02f1e07185#rd">提现问题，请点击</a></p>
            <p class="account_font03"><a href="http://mp.weixin.qq.com/s?__biz=MzAxMTA0ODM3Mw==&mid=214512529&idx=1&sn=45c11f50fcbb17188d6a8ebd9333d3e1#rd" id="share">一键加群即可获得</a><b>价值2980软件免费QQ群试用</b></p>
        </div>
        <div class="account_box">

            @foreach (ActivityDataEntity item in topList)
            {
                
                <dl>
                    <dt><span>
                        <img src="@(item.headimgUrl)"></span><b><img src="@Url.Content("~/images/account_h3_img0" + (item.Jifen >= 1500 ? 1 : item.Jifen >= 1000 ? 2 : item.Jifen >= 100 ? 3 : 4) + ".png")"></b></dt>
                    <dd>
                        <p>@(item.nickName)抓取了@(item.Jifen / 10)个涨停，获得@(item.Jifen * 1.0 / 1000)元钱</p>
                    </dd>
                </dl>
            }


        </div>
    </div>
    <div class="share">
        <h3>
            <img src="@Url.Content("~/images/share.png")"></h3>
        <p>
            点击右上角“...”分享朋友圈,晒出你的成绩,<br>
            看谁来迎战,<br>
            还有现金红包等你领取~
        </p>
    </div>
</body>
</html>
@{
    weixinUserEntity wxInfo = ViewBag.wxInfo as weixinUserEntity; 
}
<script type="text/javascript">

    var openId = '@ViewBag.openId';

    $(function () {
        $("#btnLjTx").click(function () {
            if (parseFloat($("#hb_currentMoney").text()) < 1) {
                alert("不足一元不能进行提现！");
                return;
            }

            $.ajax({
                url: '@Url.Action("TiXian", "BieCaiBaiKuai")',
                type: 'POST',
                async: false,
                data: { weixinId: weixinId, openId: openId },
                success: function (data) {
                    alert(data);
                    if (data == '提现成功') {
                        $("#hb_currentMoney").text(0);
                        $("#btnLjTx").hide();
                    }
                }
            });
        });

        $("html").addClass("tt");
        $(".share").show(1).delay(4000).hide(1, 0, hideShare);
    });


    function rize() {
        var height = document.documentElement.clientHeight;
        $(".account").css({ "min-height": height })
    };

    $("body").click(function () {
        hideShare();
    });

    function hideShare() {
        $("html").removeClass("tt");
        $(".share").hide();
        $(".share").removeClass("win");
    }

</script>
@*关于微信分享部分的代码*@
<script type="text/javascript">
    var AppId = "@wxInfo.AppId";
    var AppSercret = "@wxInfo.AppSecret";
    var goUrl = "@Config.Host_Url3" + "BieCaiBaiKuai/Index";
    var shareUrl = "@Config.ShareJQUrl";
    var weixinId = "@wxInfo.id";
    var timestamp = "@ViewBag.timestamp";
    var imgUrl = "@Config.Host_Url3" + "images/share2.png";
    var tTitle = "@System.Configuration.ConfigurationManager.AppSettings["shareTitle"]";
    var tContent = "@System.Configuration.ConfigurationManager.AppSettings["shareContent"]";
    var nonceStr = "@ViewBag.nonceStr";
    var signature = "@ViewBag.signature";

    $(function () {
        initSharePara();
    });
    ///初始化分享到朋友圈的功能
    function initSharePara() {
        tContent = tContent.replace(/xxxx/, "@(currData.Jifen * 1.0 / 1000)");
        goUrl = goUrl + "?weixinId=" + weixinId + "&fromOpenId=" + openId;
        goUrl = encodeURIComponent(goUrl);
        shareUrl = shareUrl + "?goUrl=" + goUrl + "&weixinId=" + weixinId
        mysharetime(shareUrl, imgUrl, tTitle, tContent, AppId, timestamp, nonceStr, signature, function () {

        });
    }


</script>
